﻿using DocumentFormat.OpenXml.Lite.DrawingML.Chart.Axes;
using DocumentFormat.OpenXml.Lite.DrawingML.Chart.Properties;
using DocumentFormat.OpenXml.Lite.DrawingML.Geometry.Properties;
using DocumentFormat.OpenXml.Lite.DrawingML.Text;
using DocumentFormat.OpenXml.Lite.DrawingML.Text.Properties;
using DocumentFormat.OpenXml.Lite.DrawingML.Types;
using DocumentFormat.OpenXml.Lite.Shared;
using DocumentFormat.OpenXml.Lite.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace DocumentFormat.OpenXml.Lite.DrawingML.Chart.Elements
{
    [XmlRoot("dLbl", Namespace = Constants.Chart)]
    public class DataLabel : XmlSerializable
    {
        [XmlElement("idx", Namespace = Constants.Chart)]
        public RequiredValue<uint> Index { get; set; }

        [Optional]
        [XmlElement("delete", Namespace = Constants.Chart)]
        public NullableValue<bool> Delete { get; set; }

        [Optional]
        [XmlElement("layout", Namespace = Constants.Chart)]
        public Layout Layout { get; set; }

        [Optional]
        [XmlElement("tx", Namespace = Constants.Chart)]
        public Text Text { get; set; }

        [Optional]
        [XmlElement("numFmt", Namespace = Constants.Chart)]
        public NumberFormat NumberFormat { get; set; }

        [Optional]
        [XmlElement("spPr", Namespace = Constants.Chart)]
        public ShapeProperties ShapeProperties { get; set; }

        [Optional]
        [XmlElement("txPr", Namespace = Constants.Chart)]
        public TextProperties TextProperties { get; set; }

        [Optional]
        [XmlElement("bLblPos", Namespace = Constants.Chart)]
        public RequiredValue<ST_DLblPos> DataLabelPosition { get; set; }

        [Optional]
        [XmlElement("showLegendKey", Namespace = Constants.Chart)]
        public NullableValue<bool> ShowLegendKey { get; set; }

        [Optional]
        [XmlElement("showVal", Namespace = Constants.Chart)]
        public NullableValue<bool> ShowValue { get; set; }

        [Optional]
        [XmlElement("showCatName", Namespace = Constants.Chart)]
        public NullableValue<bool> ShowCategoryName { get; set; }

        [Optional]
        [XmlElement("showSerName", Namespace = Constants.Chart)]
        public NullableValue<bool> ShowSeriesName { get; set; }

        [Optional]
        [XmlElement("showPercent", Namespace = Constants.Chart)]
        public NullableValue<bool> ShowPercent { get; set; }

        [Optional]
        [XmlElement("showBubbleSize", Namespace = Constants.Chart)]
        public NullableValue<bool> ShowBubbleSize { get; set; }

        [Optional]
        [XmlElement("separator", Namespace = Constants.Chart)]
        public SimpleText Separator { get; set; }

        [XmlElement("extLst", Namespace = Constants.Chart)]
        public ExtensionList ExtensionList { get; set; }

        public DataLabel() { }
    }
}
